-
-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to Apache Commons DBCP 2 (and Commons Pool 2) #1022
Conversation
…ommons DBCP 2.7.0
…axActive in DBCP 1.x)
deegree-core/deegree-core-commons/src/main/java/org/deegree/commons/jdbc/ConnectionPool.java
Outdated
Show resolved
Hide resolved
...rovider-datasource/src/main/java/org/deegree/db/datasource/DataSourceConnectionProvider.java
Outdated
Show resolved
Hide resolved
Fixed formatting, use of string placeholders: 9243ec4 |
This PR is ready to be merged. However, the TMC decided that we should postpone merging this PR until we're ready to release deegree 3.5 as this change breaks existing workspaces. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The suggested changes in this PR were successfully tested with a PostgreSQL DB and INSPIRE features as datasource. The only problem right now seems to be the right way in approaching the change on the user side.
The user could i.e. manually change the configuration of the existing database connection, which screams to be error prone. The other way would be to delete the current database connection and creating a new one in its place. Here could already be the "problem" as deleting an existing db connection and then creating a new one with the same name is followed up by a NPE:
HTTP Status 500 – Internal Server Error
Type Exception Report
Description
The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception
javax.servlet.ServletException
javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.deegree.client.core.filter.InputFileFilter.doFilter(InputFileFilter.java:76)
Root Cause
java.lang.NullPointerException
java.io.Reader.<init>(Reader.java:78)
java.io.InputStreamReader.<init>(InputStreamReader.java:113)
org.apache.commons.io.IOUtils.copy(IOUtils.java:892)
org.apache.commons.io.IOUtils.toString(IOUtils.java:2650)
org.apache.commons.io.IOUtils.toString(IOUtils.java:2630)
org.deegree.console.generic.XmlEditorBean.getContent(XmlEditorBean.java:182)
sun.reflect.GeneratedMethodAccessor200.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
javax.el.BeanELResolver.getValue(BeanELResolver.java:91)
com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
org.apache.el.parser.AstValue.getValue(AstValue.java:168)
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189)
com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
javax.faces.component.UIOutput.getValue(UIOutput.java:170)
com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:205)
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:355)
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:164)
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:881)
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:312)
com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105)
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
com.avax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105)
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105)
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105)
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:439)
com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.deegree.client.core.filter.InputFileFilter.doFilter(InputFileFilter.java:76)avax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105)
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105)
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105)
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:439)
com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.deegree.client.core.filter.InputFileFilter.doFilter(InputFileFilter.java:76)
As it is the PR could be merged but an update on this topic for the users sake would be necessary.
This PR was replaced by #1337 |
Apache Commons DBCP and Commons Pool dependencies were upgraded to version
2.7.0
.Reason: Currently used version is outdated and not maintained by the community any more.
Also, the documentation was updated and improved in some points (e.g. for destroyMethod).
Closes #1017.